body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, blockquote, figure, fieldset, legend, textarea, pre, form, table, th, td, caption, hr {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f0f0;
    /* overflow: scroll; */
    min-width: 1200px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

.navbar {
    display: flex;
    align-items: center;
    background-color: #fff;
    justify-content: space-between;
    padding: 5px 170px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav{
    display: flex;
}

.logo img {
    height: 50px;
    width: 50px;               /* 设置宽度为与高度一致，形成正方形 */
    object-fit: cover;         /* 保持图片比例并填满容器，裁剪多余部分 */
    border-radius: 12px;       /* 设置圆角，数值越大圆角越圆 */
    overflow: hidden;          /* 确保圆角裁剪生效 */
}

nav{
    align-content: center;
}

nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin-left: 80px;
}

nav ul li {
    margin: 0px 15px;
}

nav ul li a {
    text-decoration: none;
    color: grey;
    font-size: 14px;
}

nav ul li a:hover{
    color: rgb(20, 119, 206);
}

.info {
    display: flex;
    align-items: center;
    position: relative;
}

.login {
    background-color: white;
    /* color: #0b99ff; */
    padding: 5px 20px;
    margin: 0 0 0 20px;
    border: 1px solid #0b99ff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.login:hover {
    background: rgb(198, 237, 250);
    color: #0b99ff;
}

.register {
    background-color: #0b99ff;
    color: white;
    padding: 5px 20px;
    margin: 0 0 0 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.register:hover {
    background: #007bff;
}

#user-head {
    width: 60px; 
    height: 60px;
    border-radius: 50%;
}

/* 增加点击区域和交互稳定性 */
.info {
    cursor: pointer;
}

#user-head {
    cursor: pointer;
    object-fit: cover;
}

.card {
    display: none;
    position: absolute;
    top: 65px;
    left: 50%;
    width: 100px; 
    background-color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    text-align: center;
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.card ul {
    display: flex;
    flex-direction: column; 
    padding: 0;
    margin: 0;
}

.card li {
    list-style: none;
}

.card a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
}

.card a:hover {
    background-color: #f1f1f1;
}

.info:hover .card,
.card.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* 确保菜单在移动端也能正常工作 */
@media (max-width: 768px) {
    .card {
        width: 120px;
        font-size: 14px;
    }
    
    .card a {
        padding: 12px 8px;
    }
}

.footer {
    background-color: #6196ffdf;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #e7e7e7;
    flex-shrink: 0;
    
    
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    width: 75px;
    margin-right: 20px;
    height: 75px;
    object-fit: cover;         /* 保持图片比例并填满容器，裁剪多余部分 */
    border-radius: 12px;       /* 设置圆角，数值越大圆角越圆 */
    overflow: hidden;          /* 确保圆角裁剪生效 */
    
}

.footer-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-nav ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-nav ul li {
    margin: 0 15px;
}

.footer-nav ul li a {
    text-decoration: none;
    color: #FFE690;
    font-size: 14px;
    font-weight: 600; /* 或者 500/700，根据你想要的粗细程度 */
}

.footer-nav ul li a:hover {
    color: #fcfbf9;
    /* text-shadow: #FFE690; */
}

.footer-info {
    margin-top: 10px;
    font-size: 12px;
    color: #FFE690;
    font-weight: 600; /* 或者 500/700，根据你想要的粗细程度 */
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 8px 15px;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px #007bff;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    padding: 5px;
    font-size: 14px;
    width: 200px;
    color: #2c3e50;
}

.search-box input::placeholder {
    color: #6c757d;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #6c757d;
    transition: color 0.3s ease;
}

.search-box button:hover {
    color: #007bff;
}

/* 移动端搜索框适配 */
@media (max-width: 768px) {
    .search-box {
        margin-left: 15px;
    }
    
    .search-box input {
        width: 150px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-box {
        padding: 6px 12px;
        margin-left: 10px;
    }
    
    .search-box input {
        width: 120px;
        font-size: 12px;
    }
}